/**
 * 
 */
package niuke.Wannafly;

/**
 * @author zhongfang
 *
 */
public class test6 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Scanner sc = new Scanner(System.in);
		// int n = sc.nextInt();
		// int[] a = new int[n];
		// for (int i = 0; i < a.length; i++) {
		// a[i] = sc.nextInt();
		// }
		// sc.close();
		int mod = 1000000007;
		System.out.println(21 * getPow(10000 - 1, mod));
		System.out.println((long) mod * mod);
	}

	private static long getPow(int n, int mod) {
		if (n == 1) {
			return 2;
		}
		int half = n >> 1;
		long res = getPow(half, mod);
		res *= res;
		res %= mod;
		if ((n & 1) == 1) {
			res *= 2;
			res %= mod;
		}
		return res;
	}
}
